package com.github.edu.weixin.admin.controller;

import com.github.edu.weixin.admin.service.impl.ApplicationManagerServiceRestServer;
import com.github.edu.weixin.server.api.service.WeiXinApplicationManagerServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-23
 */

@RestController
public class ApplicationManagerController implements WeiXinApplicationManagerServiceApi {

    @Autowired
    private ApplicationManagerServiceRestServer server;

    @Override
    public String getEntity(String id) {
        return server.getEntity(id);
    }

    @Override
    public String saveOrUpdate(@RequestBody String jsonEntity) {
        
        return server.saveOrUpdate(jsonEntity);
    }

    @Override
    public String getAllByPager(String title, Integer current, Integer rows, String order, String fileId) {
        return server.getAllGetEntity(title,current,rows,order,fileId);
    }

    @Override
    public String getALLByPager(@RequestBody String jsonEntity) {
        return server.getALLPostByPager(jsonEntity);
    }

    @Override
    public String getAllEntity(String title, String order, String fileId) {
        return server.getAllEntity(title,order,fileId);
    }

    @Override
    public String deleteAll(String ids) {
        return server.delete(ids);
    }
}
